<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="<%=request.getContextPath()%>/res/jquery/jquery-1.8.2.min.js"></script>
        <script type="text/javascript">
            function exportProcess() {
                var exType = jQuery('input[name="exportType"]:checked').val();                
                if (exType != null){
                    jQuery.ajax({url : '<%=request.getContextPath()%>/form/exportForm',
                        data: {
                            key:jQuery('#keySearch').find('option:selected').text(),
                            keyvalue:jQuery('#keySearchValue').val(),
                            exportType:exType
                        },    
                        success : function (result) {    
                            
                        }
                    });
                }else {
                    alert(exType);
                }
            }
        </script>
    </head>
    <body>
        <table>
            <tr>
                <td><input type="radio" name="exportType" value="csv">Csv</input></td>
                <td><input type="radio" name="exportType" value="xls">Xls</input></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" name="exportSubmit" value="Export" onclick="exportProcess()" /></td>
            </tr>
        </table>                                    
    </body>
</html>
